package com.dotc.patterndemo.entity.Fruitt;

import android.util.Log;

import com.dotc.patterndemo.action.visit.Visit;
import com.dotc.patterndemo.entity.Fruit;
import com.dotc.patterndemo.entity.bag.OrangeBag;

public class Orange implements Fruit {
    private String name = "";
    private int price = 70;


    public Orange(String name, int price) {
        this.name = name;
        this.price = price;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    @Override
    public int price() {
        return price;
    }

    @Override
    public void draw() {

        Log.d("LUO", "砂糖橘");
    }

    @Override
    public int accept(Visit visit) {
        return visit.sell(this);
    }

    public void pack(OrangeBag bag){
        bag.pack();
    }
}
